export interface AnyObject {
  [key: string]: unknown;
}

export interface GetParams {
  body: null;
  type: string;
  url: string;
}

export interface Pagination<T> {
  records: T[]
  current: number
  size: number
  total: number
  pages: number
}

export type TimeRanger = [string, string];

/**
 * 树形数据节点
 */
export interface TreeNode {
  id?: number
  parentId?: number
  order?: number
  children?: TreeNode[]
  disabled?: boolean
}

export enum Operation {
  PREVIEW = '查看',
  CREATE = '添加',
  UPDATE = '修改'
}

export interface DataModel {
  visible: boolean
  title: string
  disabled: boolean
  submit: boolean
  type?: Operation
}
